<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script th:inline="javascript">
        function fun(){
            alert([[${name}]]+","+[[${age}]]);
        }
    </script>
</head>
<body>
<h1>inLine</h1>
<span>我是[[${name}]],练习时长[[${age}]]</span>
<input type="button" onclick="fun();" value="点我有惊喜">
</body>
</html>